const Mock = require('mockjs')

const data = Mock.mock({
  'items|30': [{
    index: '@increment',
    address:'@integer(100000000000, 999999999999)' ,
    nenghao:'@integer(10, 99999)' + 'kw',
    display_time: '@datetime',
  }]
})

// const generateMockData = () => {
//   return Mock.mock({
//     'items|30': [{
//       index: '@increment',
//       address:'@integer(100000000000, 999999999999)' ,
//       nenghao:'@integer(10, 99999)' + 'kw',
//       display_time: '@datetime',
//     }]
//   })
// };



module.exports = [
  {
    url: '/vue-admin-template/dataManage/nenghao',
    type: 'get',
    response: config => {
      const items = data.items
      // const items = generateMockData().items
      return {
        code: 20000,
        data: {
          total: items.length,
          items: items
        }
      }
    }
  }
]
